<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >线下奖品列表</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="post" action="{:url('turntable/index3')}">
            状态：
			<select class="form-control" name="status">
				<option value="">全部</option>
                <option value="0" <if condition="input('request.status') neq '' && input('request.status') eq 0">selected</if> >未处理</option>
                <option value="1" <if condition="input('request.status') neq '' && input('request.status') eq 1">selected</if> >已处理</option>
			</select>
			会员： 
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                   placeholder="请输入会员ID、靓号">
			<input type="submit" class="btn btn-primary" value="搜索">
		</form>		
        <table class="table table-hover table-bordered">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>会员 (ID)</th>
                    <th>类型</th>
                    <th>奖品</th>
                    <th>数量</th>
                    <th>中奖时间</th>
                    <th>处理时间</th>
                    <th>{:lang('ACTIONS')}</th>
                </tr>
            </thead>
            <tbody>
                <foreach name="lists" item="vo">
                <tr>
                    <td>{$vo['id']}</td>
                    <td>{$vo['userinfo']['user_nickname']} ({$vo['uid']})</td>
                    <td>{$type[$vo['type']]}</td>
                    <td>{$vo['type_val']}</td>
                    <td>{$vo['nums']}</td>
                    <td>{:date('Y-m-d H:i:s',$vo['addtime'])}</td>
                    <td>
                        <if condition="$vo['status'] eq 0">
                            未处理
                        <else/>
                            {:date('Y-m-d H:i:s',$vo['uptime'])}
                        </if>
                    </td>
                    <td>
                        <if condition="$vo['status'] eq 0">
                        <a class="btn btn-xs btn-info js-ajax-dialog-btn" href="{:url('turntable/setstatus',array('id'=>$vo['id'],'status'=>'1'))}" >标记处理</a>
                        <else/>
                        已处理
                        </if>
                    </td>
                </tr>
                </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>

	</div>
    <script src="__STATIC__/js/admin.js"></script>
</body>
</html>